﻿#include "mainwindow.h"
#include <QApplication>


#undef UNICODE
#include "AppCrash.h"
#ifdef WIN32
#pragma comment(lib, "Shell32.lib")
#endif
int main(int argc, char *argv[])
{


    if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER|SDL_INIT_EVENTS)) {
        qDebug("Cannot initialize SDL.");
    }

    qDebug()<<"main,current thread id"<<QThread::currentThread()<<"file:"<<__LINE__<<",line:"<<__LINE__;

    // 提升图像质量，否则默认缩放质量会有毛剌
    SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "1");

    QApplication a(argc, argv);
    QString str="F:/Projects/VZanMSWinRTCSdk-Demo";

    #ifdef _DEBUG
    a.addLibraryPath(QString("%1/SDL2-2.0.12/lib/Debug").arg(str));
    #else
    a.addLibraryPath(QString("%1/SDL2-2.0.12/lib/Release").arg(str));
    #endif
    #if defined(Q_OS_WIN) && !defined(Q_CC_GNU)
    ::SetUnhandledExceptionFilter(ApplicationCrashHandler);
    #endif
    MainDemoWindow w;
    w.showMaximized();
    return a.exec();
    return 0;
}

